Skip to content

Fix OpenCode Go Usage Dashboard link to open workspace-specific URL#667

Open
RizaSatya wants to merge 2 commits intosteipete:mainfrom
RizaSatya:fix/opencodego-dashboard-url
Open

Fix OpenCode Go Usage Dashboard link to open workspace-specific URL#667
RizaSatya wants to merge 2 commits intosteipete:mainfrom
RizaSatya:fix/opencodego-dashboard-url

Conversation

@RizaSatya
Copy link
Copy Markdown

Summary

Problem: When clicking "Usage Dashboard" for OpenCode Go, the app always opens https://opencode.ai/ instead of the workspace-specific usage page at https://opencode.ai/workspace/{workspace_id}/go.

Fix: Added a computed property opencodegoDashboardURL in OpenCodeGoSettingsStore.swift that constructs the correct workspace-specific URL when a workspaceID is configured. Updated StatusItemController+Actions.swift to use this URL for the OpenCode Go provider.

Files changed:

  • Sources/CodexBar/Providers/OpenCodeGo/OpenCodeGoSettingsStore.swift - Added opencodegoDashboardURL property
  • Sources/CodexBar/StatusItemController+Actions.swift - Added special handling for .opencodego in dashboardURL(for:)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f96b91963a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

var opencodegoDashboardURL: URL? {
let workspaceID = self.opencodegoWorkspaceID
if !workspaceID.isEmpty {
return URL(string: "https://opencode.ai/workspace/\(workspaceID)/go")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize workspace setting before building dashboard URL

Constructing the dashboard link with raw opencodegoWorkspaceID breaks when users paste a full workspace URL instead of just wrk_... (a format we already tolerate in OpenCodeGoUsageFetcher tests, e.g. URL-to-ID normalization). In that case this code produces https://opencode.ai/workspace/https://opencode.ai/workspace/.../go, so the “Usage Dashboard” action opens an invalid workspace path rather than the intended dashboard.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated here b17752d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant